<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGrTypeTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('gr_type', function (Blueprint $table) {
            $table->increments('id');
            $table->string('type_name')->nullable()->comment('分类名称');
            $table->string('type_img')->nullable()->comment('分类图片');
            $table->tinyInteger('type_status')->default('0')->nullable()->comment('分类状态');
            $table->integer('sort')->nullable()->comment('排序');
            $table->integer('pid')->nullable()->comment('父类id 0位一级');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('gr_type');
    }
}
